<?php
/**
 * CPage class file.
 * 
 * @author Lucas Vasconcelos <contato@lucasvasconcelos.com>
 * @copyright Copyright(c) 2010 Lucas Vasconcelos
 * @license BSD License http://www.lucasvasconcelos.com/yap/license
 * @link http://www.lucasvasconcelos.com/yap/
 * @version $Id: CPage.php 5 2010-01-28 20:07:46Z contato@lucasvasconcelos.com $
 * @package yap.web.ui
 */

/**
 * CPage class.
 * 
 * @author Lucas Vasconcelos <contato@lucasvasconcelos.com>
 * @version 1.0 $Revision: 5 $
 * @package yap.web.ui
 */
class CPage extends TPage
{
	/**
	 * @return string id name of current page.
	 */
	public function getName()
	{
		return $this->getPagePath();
	}
	
	/**
	 * @return string url to current page.
	 */
	public function getUrl()
	{
		return $this->getService()->constructUrl($this->getName());
	}
	
	/**
	 * Just return to inital status.
	 */
	public function reload()
	{
		$this->getResponse()->redirect($this->getUrl());
	}
}